﻿<Window x:Class="Sample01.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:tools="clr-namespace:Invini.Tools;assembly=Invini.Tools"
        xmlns:localization="clr-namespace:Invini.Localization;assembly=Invini.Localization"
        Title="Sample 01" Height="350" Width="525">

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Localization.xaml" />
            </ResourceDictionary.MergedDictionaries>
            
            <!-- other resources go here -->
            
            <Style TargetType="{x:Type Button}">
                <Setter Property="Margin" Value="5" />
            </Style>
            
        </ResourceDictionary>
    </Window.Resources>
    
    <StackPanel>
        <TextBlock HorizontalAlignment="Center"
                   VerticalAlignment="Center"
                   FontSize="18"
                   Text="{localization:Localize Set={StaticResource HelloWorld}, DefaultContent='Hello World!'}" />
        
        
        <Button Content="Change to invariant" Click="invariant" />
        <Button Content="Change to en" Click="en" />
        <Button Content="Change to en-us" Click="enUS" />
        <Button Content="Change to en-gb" Click="enGB" />
        <Button Content="Change to pl" Click="pl" />
        <Button Content="Change to en-au (doesn't exist intentionally)" Click="enAU" />
        <Button Content="Change to zh-tw (doesn't exist intentionally)" Click="zhTW" />
    </StackPanel>
</Window>
